﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="activeadd.aspx.cs" Inherits="UI.system.page.product.activeadd" %>
<%@ Import Namespace="Model" %>
<%@ Import Namespace="Common" %>
<div style="margin: 15px;">
	<form class="layui-form" style="padding-left:0px;">
        <div class="layui-form-item">
			<label class="layui-form-label"><font>位置</font><em>*</em></label>
			<div class="layui-input-block">
				<select id="position" name="position" lay-verify="required" lay-filter="sendtype">
                        <%foreach (int key in Commons.ActivePosition.Keys)
                          {
                              if (key > 0)
                              {
                              %>
                        
					    <option value="<%=key %>" <%=info.Position==key?"selected":"" %>><%=Commons.ActivePosition[key]%></option>
					    <%}} %>
				</select>
			</div>
		</div>
        <div class="layui-form-item">
			<label class="layui-form-label"><font>选择商品</font><em>*</em></label>
			<div class="layui-input-block">
                <input id="productid" type="text" name="name" placeholder="请选择商品" lay-verify="required" autocomplete="off" class="layui-input" readonly="readonly" style="cursor:pointer;" val="<%=product.ID %>" value="<%=product.Name %>" onclick="Select_Product()">
			</div>
		</div>
        <div class="layui-form-item">
			<label class="layui-form-label"><font>活动图片</font><em>*</em></label>
			<div class="layui-input-inline">
				<div class='upload_product upload_file_o <%=string.IsNullOrEmpty(info.Img)?"":"hidden" %>'><div id="upload_file_o"></div></div>
                 <div class='upload_show <%=string.IsNullOrEmpty(info.Img)?"hidden":"" %>'>
                     <div class="img_container" src="<%=info.Img %>"><img src="<%=info.Img %>"/></div>
                     <div class="reupload"><a onclick="Re_Upload(this)">重传</a></div>
                 </div> <div style="float:left; color:red; padding-top:5px; font-size:12px; padding-left:10px;"></div>
			</div>
		</div>
        <div class="layui-form-item">
			<label class="layui-form-label"><font>是否显示</font><em>*</em></label>
			<div class="layui-input-inline">
				<input type="radio" name="isshow" lay-filter="isshow" value="1" title="是" <%=info.IsShow==1?"checked='checked'":"" %>>
                <input type="radio" name="isshow" lay-filter="isshow" value="0" title="否" <%=info.IsShow==0?"checked='checked'":"" %>>
			</div>
		</div>
		<a lay-filter="save" lay-submit style="display: none;"></a>
	</form>
</div>
<script>
    layui.use(["form", "table", "laydate"], function () {
        var $ = layui.jquery, form = layui.form, laydate = layui.laydate;
        table = layui.table;
    });

    function Select_Product() {
        Ajax.Get("/system/page/product/selectproduct.aspx", function (html) {
            product_index = window.parent.LayerBox.Search("选择商品", html, 830, 600);
        });
    };
</script>